<extend name="common:commonTemplate" />
<block name="main_content">
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a class="tip-bottom" href="index.html"
				data-original-title="Go to Home"><i class="icon-home"></i> 首页</a> <a
				href="#">商品</a> <a class="current" href="#">sku信息列表</a>
		</div>
	</div>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"> <i class="icon-info-sign"></i>
						</span>
						<h5>sku信息</h5>
					</div>
					<div class="widget-content nopadding">
						<form novalidate="novalidate" id="basic_validate"
							name="basic_validate" action="#" method="post"
							class="form-horizontal">
							<div class="control-group">
								<label class="control-label">sku_sn</label>
								<div class="controls">
									<input type="text" id="sku_sn" name="sku_sn"/>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">sku_name</label>
								<div class="controls">
									<input type="text" id="sku_name" name="sku_name">
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label">淘宝sku_id</label>
								<div class="controls">
									<input type="text" id="taobao_sku_id" name="taobao_sku_id">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">淘宝属性值</label>
								<div class="controls">
									<input type="text" id="taobao_sku_properties_name" name="taobao_sku_properties_name">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">商品编码</label>
								<div class="controls">
									<input type="text" id="style_sn" name="style_sn">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">商品名称</label>
								<div class="controls">
									<input type="text" id="style_name" name="style_name">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">促销语</label>
								<div class="controls">
									<input type="text" id="promotion_text" name="promotion_text">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">淘宝style_id</label>
								<div class="controls">
									<input type="text" id="taobao_style_id" name="taobao_style_id">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">淘宝style_name</label>
								<div class="controls">
									<input type="text" id="taobao_style_name" name="taobao_style_name">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">淘宝分类id</label>
								<div class="controls">
									<input type="text" id="taobao_category_id" name="taobao_category_id">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">sku维度1编号</label>
								<div class="controls">
									<input type="text" id="sku_dimension_id1" name="sku_dimension_id1">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">sku维度1名称</label>
								<div class="controls">
									<input type="text" id="sku_dimension_name1" name="sku_dimension_name1">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">sku维度1值</label>
								<div class="controls">
									<input type="text" id="sku_dimension_value1" name="sku_dimension_value1">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">sku维度2编号</label>
								<div class="controls">
									<input type="text" id="sku_dimension_id2" name="sku_dimension_id2">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">sku维度2名称</label>
								<div class="controls">
									<input type="text" id="sku_dimension_name2" name="sku_dimension_name2">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">sku维度2值</label>
								<div class="controls">
									<input type="text" id="sku_dimension_value2" name="sku_dimension_value2">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">市场价</label>
								<div class="controls">
									<input type="text" id="market_price" name="market_price">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">单价</label>
								<div class="controls">
									<input type="text" id="sale_price" name="sale_price">(O2O渠道售价)
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">个人提成金额</label>
								<div class="controls">
									<input type="text" id="person_commission_amount" name="person_commission_amount">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">经销商提成金额</label>
								<div class="controls">
									<input type="text" id="dealer_commission_amount" name="dealer_commission_amount">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">图片</label>
								<div class="controls">
									<input type="text" id="image" name="image">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">图片集合</label>
								<div class="controls">
									<input type="text" id="image_list" name="image_list">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">客户物料号</label>
								<div class="controls">
									<input type="text" id="material_no" name="material_no">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">客户物描述</label>
								<div class="controls">
									<input type="text" id="material_desc" name="material_desc">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">69码</label>
								<div class="controls">
									<input type="text" id="69_code" name="69_code">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">海尔物料号</label>
								<div class="controls">
									<input type="text" id="haier_material_no" name="haier_material_no">
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label">长度（mm）</label>
								<div class="controls">
									<input type="text" id="material_length" name="material_length">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">宽度（mm）</label>
								<div class="controls">
									<input type="text" id="material_width" name="material_width">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">高度（mm）</label>
								<div class="controls">
									<input type="text" id="material_height" name="material_height">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">体积（mm）</label>
								<div class="controls">
									<input type="text" id="material_volume" name="material_volume">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">重量（kg）</label>
								<div class="controls">
									<input type="text" id="material_weight" name="material_weight">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">英雄会项目中是否可购买</label>
								<div class="controls">
					                <select id="is_buy_fz" name="is_buy_fz">
					                  <option value="1">是</option>
					                  <option value="0">否</option>
					                </select>
					           </div>
							</div>
							<div class="control-group">
								<label class="control-label">状态</label>
								<div class="controls">
									<select id="status" name="status">
					                  <option value="1">有效</option>
					                  <option value="0">无效</option>
					                </select>
								</div>
							</div>
							<div class="control-group">
								<a id="btn_addSku" class="btn btn-success">新增商品</a> 
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</block>


<block name="js_content"> <script>
		//新增商品
		$('#btn_addSku').bind('click', function(){
			var sku_sn = $('#sku_sn').val();
			var sku_name = $('#sku_name').val();
			var taobao_sku_id = $('#taobao_sku_id').val();
			var taobao_sku_properties_name = $('#taobao_sku_properties_name').val();
			var style_sn = $('#style_sn').val();
			var style_name = $('#style_name').val();
			var promotion_text = $('#promotion_text').val();
			var taobao_style_id = $('#taobao_style_id').val();
			var taobao_style_name = $('#taobao_style_name').val();
			var taobao_category_id = $('#taobao_category_id').val();
			var sku_dimension_id1 = $('#sku_dimension_id1').val();
			var sku_dimension_name1 = $('#sku_dimension_name1').val();
			var sku_dimension_value1 = $('#sku_dimension_value1').val();
			var sku_dimension_id2 = $('#sku_dimension_id2').val();
			var sku_dimension_name2 = $('#sku_dimension_name2').val();
			var sku_dimension_value2 = $('#sku_dimension_value2').val();
			var market_price = $('#market_price').val();
			var sale_price = $('#sale_price').val();
			var person_commission_amount = $('#person_commission_amount').val();
			var dealer_commission_amount = $('#dealer_commission_amount').val();
			var image = $('#image').val();
			var image_list = $('#image_list').val();
			var material_no = $('#material_no').val();
			var material_desc = $('#material_desc').val();
			var code = $('#69_code').val();
			var haier_material_no = $('#haier_material_no').val();
			var material_length = $('#material_length').val();
			var material_width = $('#material_width').val();
			var material_height = $('#material_height').val();
			var material_volume = $('#material_volume').val();
			var material_weight = $('#material_weight').val();
			var is_buy_fz = $('#is_buy_fz').val();
			var status = $('#status').val();
			var result = SkuService.AddSku( sku_sn,  sku_name,  taobao_sku_id, taobao_sku_properties_name ,
					 style_sn, style_name, promotion_text, taobao_style_id , taobao_style_name,
					 taobao_category_id , sku_dimension_id1 , sku_dimension_name1 , sku_dimension_value1 ,
					 sku_dimension_id2, sku_dimension_name2, sku_dimension_value2 , market_price ,
					 sale_price,  person_commission_amount, dealer_commission_amount, image, image_list ,
					 material_no , material_desc, code ,  haier_material_no,  material_length ,
					 material_width, material_height , material_volume , material_weight , is_buy_fz, status);
			if (result.IsSuccess == 0) {
				alert(result.ErrorMsg);
				return;
			} else {
				alert('操作成功');
				$('#promoter_status').text('有效');
			}
		});
</script> </block>